package com.king.designpatterns.结构型模式.装饰模式;

/**
 * 汽车装饰具体实现类
 *
 * @author king
 * @date 2021-06-08 11:14
 */
public class ConcreteCarDecorator extends CarDecorator{
    public ConcreteCarDecorator(Car car) {
        super(car);
    }

    /**
     * 给车进行彩绘
     */
    private void print() {
        System.out.println("在车尾绘制“新手”字样，颜色是紫色霞光");
    }

    /**
     * 给车安装GPS设备
     */
    private void setGps() {
        System.out.println("安装GPS定位导航系统");
    }

    /**
     * 重写
     */
    @Override
    public void show() {
        super.show();
        this.print();
        this.setGps();
    }
}
